package com.jt.tenant.conn;

import com.jt.tenant.app.JTApplication;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/3/9.
 */
@HttpInlet(Conn.INLET_GET_FREEWAY_DETAIL)
public class GetFreeWayDetail extends JTAsyGet<GetFreeWayDetail.Info> {

    public String token = JTApplication.jtPreferences.readToken();

    public String order_num;

//    public String token = "74PWI719WPA5GY23AURVFBMLOPSQ5Z";
//
//    public String order_num = "1111";

    public GetFreeWayDetail(AsyCallBack<Info> asyCallBack) {

        super(asyCallBack);

    }

    @Override
    protected Info parser(JSONObject object) {

        JSONObject apiTYF = object.optJSONObject("apiTYF");

        JSONObject head = apiTYF.optJSONObject("head");

        Info info = new Info();

        info.msg = head.optString("msg");

        info.code = head.optString("code");

        JSONObject body = apiTYF.optJSONObject("body");

        JSONArray detailList = body.optJSONArray("egsOrderDetailList");

        if (detailList != null) {

            for (int i = 0; i < detailList.length(); i++) {

                JSONObject detail = detailList.optJSONObject(i);

                DetailItem detailItem = new DetailItem();

                detailItem.order_code = detail.optString("DETAIL_ORDER_CODE");

                detailItem.start_point_f = detail.optString("DEATIL_IN_CHARGE");

                detailItem.end_point_f = detail.optString("DEATIL_OUT_CHARGE");

                detailItem.start_time = detail.optString("DEATIL_IN_TIME");

                detailItem.end_time = detail.optString("DEATIL_OUT_TIME");

                detailItem.money = detail.optString("DEATIL_PAY");

                detailItem.id = detail.optString("DETAIL_ID");

                detailItem.start_point = detail.optString("DEATIL_IN_NAME");

                detailItem.end_point = detail.optString("DEATIL_OUT_NAME");

                JSONArray gpsList = new JSONArray();

                if(i == 0){

                    try {

                        gpsList = new JSONArray("[{\"LONGITUDE\":\"126.79970584661177\",\"LATITUDE\":\"45.77892777567728\"},{\"LONGITUDE\":\"126.7998650965115\",\"LATITUDE\":\"45.77894008132974\"},{\"LONGITUDE\":\"126.79998528415902\",\"LATITUDE\":\"45.77895155963949\"},{\"LONGITUDE\":\"126.80044299361627\",\"LATITUDE\":\"45.77895759230915\"},{\"LONGITUDE\":\"126.80117911148454\",\"LATITUDE\":\"45.77897749095837\"},{\"LONGITUDE\":\"126.8018460999633\",\"LATITUDE\":\"45.7789967482693\"},{\"LONGITUDE\":\"126.80439165591844\",\"LATITUDE\":\"45.77907487976668\"},{\"LONGITUDE\":\"126.80581448968515\",\"LATITUDE\":\"45.779156784288496\"},{\"LONGITUDE\":\"126.8061719327052\",\"LATITUDE\":\"45.77918255233745\"},{\"LONGITUDE\":\"126.8073943970681\",\"LATITUDE\":\"45.77921248790816\"},{\"LONGITUDE\":\"126.80962084768818\",\"LATITUDE\":\"45.77929967993919\"},{\"LONGITUDE\":\"126.81399383588828\",\"LATITUDE\":\"45.77945659512457\"},{\"LONGITUDE\":\"126.8147283962239\",\"LATITUDE\":\"45.77948903569928\"},{\"LONGITUDE\":\"126.81483847760403\",\"LATITUDE\":\"45.77949080964582\"},{\"LONGITUDE\":\"126.81607033738744\",\"LATITUDE\":\"45.77955241464935\"},{\"LONGITUDE\":\"126.81956928763533\",\"LATITUDE\":\"45.779690979627716\"},{\"LONGITUDE\":\"126.82372564267031\",\"LATITUDE\":\"45.7798851820824\"},{\"LONGITUDE\":\"126.8242227346464\",\"LATITUDE\":\"45.779902922890635\"},{\"LONGITUDE\":\"126.82490983616403\",\"LATITUDE\":\"45.77994263311698\"},{\"LONGITUDE\":\"126.82610394359827\",\"LATITUDE\":\"45.78001831948256\"},{\"LONGITUDE\":\"126.82742695473367\",\"LATITUDE\":\"45.78021525175614\"},{\"LONGITUDE\":\"126.82848288346788\",\"LATITUDE\":\"45.78042840930479\"},{\"LONGITUDE\":\"126.83039456358169\",\"LATITUDE\":\"45.78108916853184\"},{\"LONGITUDE\":\"126.83089244039246\",\"LATITUDE\":\"45.78130346658275\"},{\"LONGITUDE\":\"126.83097241937092\",\"LATITUDE\":\"45.78133451843616\"},{\"LONGITUDE\":\"126.83159923939384\",\"LATITUDE\":\"45.781599961621815\"},{\"LONGITUDE\":\"126.83214706178465\",\"LATITUDE\":\"45.78183540302584\"},{\"LONGITUDE\":\"126.83305472717302\",\"LATITUDE\":\"45.782213245718864\"},{\"LONGITUDE\":\"126.83461902964079\",\"LATITUDE\":\"45.78287402203554\"},{\"LONGITUDE\":\"126.8356964616361\",\"LATITUDE\":\"45.78332148356836\"},{\"LONGITUDE\":\"126.83592533205156\",\"LATITUDE\":\"45.783412819048245\"},{\"LONGITUDE\":\"126.83608523908255\",\"LATITUDE\":\"45.78348305841983\"},{\"LONGITUDE\":\"126.83872048632054\",\"LATITUDE\":\"45.78457461522642\"},{\"LONGITUDE\":\"126.84027825129681\",\"LATITUDE\":\"45.785218846211976\"},{\"LONGITUDE\":\"126.84227645548906\",\"LATITUDE\":\"45.78602056964819\"},{\"LONGITUDE\":\"126.84348626479326\",\"LATITUDE\":\"45.78638974652926\"},{\"LONGITUDE\":\"126.84431640822761\",\"LATITUDE\":\"45.7865490653709\"},{\"LONGITUDE\":\"126.8455570629106\",\"LATITUDE\":\"45.786705737820185\"},{\"LONGITUDE\":\"126.84643806124024\",\"LATITUDE\":\"45.78675349523639\"},{\"LONGITUDE\":\"126.84738894134043\",\"LATITUDE\":\"45.78670961099876\"},{\"LONGITUDE\":\"126.84835076565768\",\"LATITUDE\":\"45.78658590797711\"},{\"LONGITUDE\":\"126.8494533626463\",\"LATITUDE\":\"45.786369864596566\"},{\"LONGITUDE\":\"126.8506158263024\",\"LATITUDE\":\"45.78599324083502\"},{\"LONGITUDE\":\"126.85188008207695\",\"LATITUDE\":\"45.78547423305574\"},{\"LONGITUDE\":\"126.85462999989673\",\"LATITUDE\":\"45.78422090144478\"},{\"LONGITUDE\":\"126.85739149797165\",\"LATITUDE\":\"45.78295369668728\"},{\"LONGITUDE\":\"126.8596415418065\",\"LATITUDE\":\"45.781918890720306\"},{\"LONGITUDE\":\"126.86161087368427\",\"LATITUDE\":\"45.781025233083525\"},{\"LONGITUDE\":\"126.86354109996401\",\"LATITUDE\":\"45.78014084620341\"},{\"LONGITUDE\":\"126.86366085994199\",\"LATITUDE\":\"45.78008951974647\"},{\"LONGITUDE\":\"126.865993057088\",\"LATITUDE\":\"45.77909897820843\"},{\"LONGITUDE\":\"126.86740103985127\",\"LATITUDE\":\"45.77857040855992\"},{\"LONGITUDE\":\"126.86900948739564\",\"LATITUDE\":\"45.77809830846213\"},{\"LONGITUDE\":\"126.87022573085436\",\"LATITUDE\":\"45.77780197915322\"},{\"LONGITUDE\":\"126.87266802423486\",\"LATITUDE\":\"45.777299842145965\"},{\"LONGITUDE\":\"126.87512905456082\",\"LATITUDE\":\"45.77699941157663\"},{\"LONGITUDE\":\"126.87556098558208\",\"LATITUDE\":\"45.77696337697295\"},{\"LONGITUDE\":\"126.87644477993875\",\"LATITUDE\":\"45.77688349594754\"},{\"LONGITUDE\":\"126.87661535108353\",\"LATITUDE\":\"45.776881684563854\"},{\"LONGITUDE\":\"126.879165835724\",\"LATITUDE\":\"45.77682274552214\"},{\"LONGITUDE\":\"126.8866178248966\",\"LATITUDE\":\"45.77697219465663\"},{\"LONGITUDE\":\"126.88996247177553\",\"LATITUDE\":\"45.77706011235301\"},{\"LONGITUDE\":\"126.8944516679381\",\"LATITUDE\":\"45.77718859328917\"},{\"LONGITUDE\":\"126.89937342664479\",\"LATITUDE\":\"45.77736205722731\"},{\"LONGITUDE\":\"126.90158699242201\",\"LATITUDE\":\"45.77743088872844\"},{\"LONGITUDE\":\"126.9027426328867\",\"LATITUDE\":\"45.77747219887016\"},{\"LONGITUDE\":\"126.90332992714625\",\"LATITUDE\":\"45.77746892831208\"},{\"LONGITUDE\":\"126.90610787552507\",\"LATITUDE\":\"45.77745425325093\"},{\"LONGITUDE\":\"126.90943928773785\",\"LATITUDE\":\"45.777366845435445\"},{\"LONGITUDE\":\"126.91269702852045\",\"LATITUDE\":\"45.77714853943517\"},{\"LONGITUDE\":\"126.91419581821717\",\"LATITUDE\":\"45.77704922290259\"},{\"LONGITUDE\":\"126.9146126543236\",\"LATITUDE\":\"45.776998454634466\"},{\"LONGITUDE\":\"126.91496965980063\",\"LATITUDE\":\"45.776956215951024\"},{\"LONGITUDE\":\"126.91617033145478\",\"LATITUDE\":\"45.7768234562743\"},{\"LONGITUDE\":\"126.9167158281375\",\"LATITUDE\":\"45.77676562960008\"},{\"LONGITUDE\":\"126.919800443764\",\"LATITUDE\":\"45.77640990660844\"},{\"LONGITUDE\":\"126.92604219408759\",\"LATITUDE\":\"45.7757320129442\"},{\"LONGITUDE\":\"126.92761727127277\",\"LATITUDE\":\"45.77557390068199\"},{\"LONGITUDE\":\"126.92764719744305\",\"LATITUDE\":\"45.7755751054004\"},{\"LONGITUDE\":\"126.92908369099132\",\"LATITUDE\":\"45.77545383639119\"},{\"LONGITUDE\":\"126.93075769302708\",\"LATITUDE\":\"45.77536792917917\"},{\"LONGITUDE\":\"126.93350135795309\",\"LATITUDE\":\"45.775410499900424\"},{\"LONGITUDE\":\"126.93598786536042\",\"LATITUDE\":\"45.775634726349416\"},{\"LONGITUDE\":\"126.93790080975168\",\"LATITUDE\":\"45.77594096142374\"},{\"LONGITUDE\":\"126.94053847255128\",\"LATITUDE\":\"45.77651273243845\"},{\"LONGITUDE\":\"126.94281012163316\",\"LATITUDE\":\"45.77717175192591\"},{\"LONGITUDE\":\"126.94479551182174\",\"LATITUDE\":\"45.77786070134692\"},{\"LONGITUDE\":\"126.94708957359829\",\"LATITUDE\":\"45.77872252856907\"},{\"LONGITUDE\":\"126.94979326862864\",\"LATITUDE\":\"45.77970433682878\"},{\"LONGITUDE\":\"126.95021063701978\",\"LATITUDE\":\"45.77986006544056\"},{\"LONGITUDE\":\"126.95038038279618\",\"LATITUDE\":\"45.779921761196476\"},{\"LONGITUDE\":\"126.9526990618327\",\"LATITUDE\":\"45.7807498373377\"},{\"LONGITUDE\":\"126.95372468355475\",\"LATITUDE\":\"45.7811205940506\"},{\"LONGITUDE\":\"126.95743317944675\",\"LATITUDE\":\"45.782428825773714\"},{\"LONGITUDE\":\"126.95879072315915\",\"LATITUDE\":\"45.78288476397062\"},{\"LONGITUDE\":\"126.96214658406694\",\"LATITUDE\":\"45.78388023294423\"},{\"LONGITUDE\":\"126.96396716217376\",\"LATITUDE\":\"45.78432806257045\"},{\"LONGITUDE\":\"126.96617970405805\",\"LATITUDE\":\"45.78479898222508\"},{\"LONGITUDE\":\"126.96772286616782\",\"LATITUDE\":\"45.785060235645254\"},{\"LONGITUDE\":\"126.97020982259147\",\"LATITUDE\":\"45.785430028209646\"},{\"LONGITUDE\":\"126.97239722240606\",\"LATITUDE\":\"45.7856766245992\"},{\"LONGITUDE\":\"126.9748189065416\",\"LATITUDE\":\"45.78586544955506\"},{\"LONGITUDE\":\"126.97647690029552\",\"LATITUDE\":\"45.78596144175211\"},{\"LONGITUDE\":\"126.97905223490422\",\"LATITUDE\":\"45.785999509205425\"},{\"LONGITUDE\":\"126.98170000916113\",\"LATITUDE\":\"45.785951384315936\"},{\"LONGITUDE\":\"126.98464137752754\",\"LATITUDE\":\"45.785792646411274\"},{\"LONGITUDE\":\"126.98774539216345\",\"LATITUDE\":\"45.78553714471622\"},{\"LONGITUDE\":\"126.99101112889771\",\"LATITUDE\":\"45.78522565475522\"},{\"LONGITUDE\":\"126.9936828239421\",\"LATITUDE\":\"45.78499525250256\"},{\"LONGITUDE\":\"126.9986028372407\",\"LATITUDE\":\"45.784547709033056\"},{\"LONGITUDE\":\"126.9999627307964\",\"LATITUDE\":\"45.78443848902707\"},{\"LONGITUDE\":\"127.00236130998232\",\"LATITUDE\":\"45.784228621567976\"},{\"LONGITUDE\":\"127.00515084360556\",\"LATITUDE\":\"45.78398511417673\"},{\"LONGITUDE\":\"127.00723448105644\",\"LATITUDE\":\"45.78380807254139\"},{\"LONGITUDE\":\"127.01133824223493\",\"LATITUDE\":\"45.783483628953206\"},{\"LONGITUDE\":\"127.01226209527476\",\"LATITUDE\":\"45.78340050982948\"},{\"LONGITUDE\":\"127.01479435965659\",\"LATITUDE\":\"45.78320895424968\"},{\"LONGITUDE\":\"127.0182660033481\",\"LATITUDE\":\"45.78293581582512\"},{\"LONGITUDE\":\"127.02082292528723\",\"LATITUDE\":\"45.78274843090201\"},{\"LONGITUDE\":\"127.02134416163324\",\"LATITUDE\":\"45.782705010939885\"},{\"LONGITUDE\":\"127.02668935095944\",\"LATITUDE\":\"45.782320504398335\"},{\"LONGITUDE\":\"127.03057847145777\",\"LATITUDE\":\"45.78206647833475\"},{\"LONGITUDE\":\"127.0329548416066\",\"LATITUDE\":\"45.78189583836879\"},{\"LONGITUDE\":\"127.03692574722919\",\"LATITUDE\":\"45.78163162993227\"},{\"LONGITUDE\":\"127.03863151980897\",\"LATITUDE\":\"45.78147541694695\"},{\"LONGITUDE\":\"127.04005653925807\",\"LATITUDE\":\"45.781349287186174\"},{\"LONGITUDE\":\"127.04316539577341\",\"LATITUDE\":\"45.78103076909627\"},{\"LONGITUDE\":\"127.04547603966815\",\"LATITUDE\":\"45.780726385801316\"},{\"LONGITUDE\":\"127.04552618441572\",\"LATITUDE\":\"45.7807169857607\"},{\"LONGITUDE\":\"127.04978851148717\",\"LATITUDE\":\"45.7801478699547\"},{\"LONGITUDE\":\"127.0526568181875\",\"LATITUDE\":\"45.7797328796958\"},{\"LONGITUDE\":\"127.05548498188237\",\"LATITUDE\":\"45.779325279881455\"},{\"LONGITUDE\":\"127.06007911200577\",\"LATITUDE\":\"45.77867391973171\"},{\"LONGITUDE\":\"127.06052738084595\",\"LATITUDE\":\"45.77860840564576\"},{\"LONGITUDE\":\"127.06487553354229\",\"LATITUDE\":\"45.77796274354805\"},{\"LONGITUDE\":\"127.06723097657917\",\"LATITUDE\":\"45.77759689383291\"},{\"LONGITUDE\":\"127.07180713857227\",\"LATITUDE\":\"45.77691118860529\"},{\"LONGITUDE\":\"127.07373710586987\",\"LATITUDE\":\"45.77661141965678\"},{\"LONGITUDE\":\"127.07437773094912\",\"LATITUDE\":\"45.776520913911895\"},{\"LONGITUDE\":\"127.07879358635186\",\"LATITUDE\":\"45.77581681458985\"},{\"LONGITUDE\":\"127.07906423063883\",\"LATITUDE\":\"45.77577502765917\"},{\"LONGITUDE\":\"127.08487240864753\",\"LATITUDE\":\"45.774806469637085\"},{\"LONGITUDE\":\"127.08950494352516\",\"LATITUDE\":\"45.77401700080688\"},{\"LONGITUDE\":\"127.09328801772678\",\"LATITUDE\":\"45.77336534969054\"},{\"LONGITUDE\":\"127.09345832028347\",\"LATITUDE\":\"45.77333250888585\"},{\"LONGITUDE\":\"127.1101886637216\",\"LATITUDE\":\"45.770349275254326\"},{\"LONGITUDE\":\"127.11273869206214\",\"LATITUDE\":\"45.76989359220442\"},{\"LONGITUDE\":\"127.1159436952383\",\"LATITUDE\":\"45.76936696339624\"},{\"LONGITUDE\":\"127.11827076515326\",\"LATITUDE\":\"45.76905094783709\"},{\"LONGITUDE\":\"127.12034444484424\",\"LATITUDE\":\"45.76884202789056\"},{\"LONGITUDE\":\"127.12191378517073\",\"LATITUDE\":\"45.76868505762251\"},{\"LONGITUDE\":\"127.1241570146201\",\"LATITUDE\":\"45.76855939684808\"},{\"LONGITUDE\":\"127.12526301561117\",\"LATITUDE\":\"45.76852338587669\"},{\"LONGITUDE\":\"127.12692087661425\",\"LATITUDE\":\"45.76846175846222\"},{\"LONGITUDE\":\"127.12945134400428\",\"LATITUDE\":\"45.76844322751998\"},{\"LONGITUDE\":\"127.13284102551825\",\"LATITUDE\":\"45.7685458934056\"},{\"LONGITUDE\":\"127.13623601560096\",\"LATITUDE\":\"45.768781497098736\"},{\"LONGITUDE\":\"127.13957537555248\",\"LATITUDE\":\"45.76917086872357\"},{\"LONGITUDE\":\"127.14212292218205\",\"LATITUDE\":\"45.76945870923319\"},{\"LONGITUDE\":\"127.14514553000238\",\"LATITUDE\":\"45.7698291627911\"},{\"LONGITUDE\":\"127.14758641746597\",\"LATITUDE\":\"45.77013283174765\"},{\"LONGITUDE\":\"127.14844224826861\",\"LATITUDE\":\"45.77022208551118\"},{\"LONGITUDE\":\"127.14958762217805\",\"LATITUDE\":\"45.770357611623474\"},{\"LONGITUDE\":\"127.1503834501757\",\"LATITUDE\":\"45.77041787039875\"},{\"LONGITUDE\":\"127.15175535154968\",\"LATITUDE\":\"45.77051870507417\"},{\"LONGITUDE\":\"127.1533857309199\",\"LATITUDE\":\"45.77063599035396\"},{\"LONGITUDE\":\"127.15525356170794\",\"LATITUDE\":\"45.770699794548314\"},{\"LONGITUDE\":\"127.15527352688193\",\"LATITUDE\":\"45.77069989125026\"},{\"LONGITUDE\":\"127.15731885827286\",\"LATITUDE\":\"45.77078108383019\"},{\"LONGITUDE\":\"127.15930310755991\",\"LATITUDE\":\"45.770793499519385\"},{\"LONGITUDE\":\"127.1629726973293\",\"LATITUDE\":\"45.77068006824514\"},{\"LONGITUDE\":\"127.16634238524637\",\"LATITUDE\":\"45.77050536053108\"},{\"LONGITUDE\":\"127.16645114156604\",\"LATITUDE\":\"45.770498036668435\"},{\"LONGITUDE\":\"127.16649105185941\",\"LATITUDE\":\"45.770489285058176\"},{\"LONGITUDE\":\"127.1665299646039\",\"LATITUDE\":\"45.77049052749599\"},{\"LONGITUDE\":\"127.16928463335933\",\"LATITUDE\":\"45.77031309590708\"}]");

                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                }else if(i == 1){

                    try {
                        gpsList = new JSONArray("[{\"LONGITUDE\":\"127.17283008248576\",\"LATITUDE\":\"45.77008882512432\"},{\"LONGITUDE\":\"127.1739004190979\",\"LATITUDE\":\"45.770037218026374\"},{\"LONGITUDE\":\"127.17476224858902\",\"LATITUDE\":\"45.770000243374774\"},{\"LONGITUDE\":\"127.17622850393644\",\"LATITUDE\":\"45.769919636995354\"},{\"LONGITUDE\":\"127.17883370301251\",\"LATITUDE\":\"45.769836520385866\"},{\"LONGITUDE\":\"127.18335450264881\",\"LATITUDE\":\"45.76971640051436\"},{\"LONGITUDE\":\"127.18346420089682\",\"LATITUDE\":\"45.76970923805292\"},{\"LONGITUDE\":\"127.18580471342659\",\"LATITUDE\":\"45.769711261581215\"},{\"LONGITUDE\":\"127.18830667522079\",\"LATITUDE\":\"45.769702814803594\"},{\"LONGITUDE\":\"127.1889229280191\",\"LATITUDE\":\"45.76971467041341\"},{\"LONGITUDE\":\"127.194529839883\",\"LATITUDE\":\"45.76982538283833\"},{\"LONGITUDE\":\"127.1981443592367\",\"LATITUDE\":\"45.76998852200365\"},{\"LONGITUDE\":\"127.20110475943072\",\"LATITUDE\":\"45.77007242779144\"},{\"LONGITUDE\":\"127.20386974841128\",\"LATITUDE\":\"45.770167699355525\"},{\"LONGITUDE\":\"127.20485889276624\",\"LATITUDE\":\"45.77020063846584\"},{\"LONGITUDE\":\"127.20891726732403\",\"LATITUDE\":\"45.77033395984507\"},{\"LONGITUDE\":\"127.21145908913296\",\"LATITUDE\":\"45.77045792138503\"},{\"LONGITUDE\":\"127.21391325715577\",\"LATITUDE\":\"45.77060692319697\"},{\"LONGITUDE\":\"127.21450462737269\",\"LATITUDE\":\"45.770643456234446\"},{\"LONGITUDE\":\"127.21829435939591\",\"LATITUDE\":\"45.77092401946506\"},{\"LONGITUDE\":\"127.22186700015178\",\"LATITUDE\":\"45.77123805871544\"},{\"LONGITUDE\":\"127.22285148339718\",\"LATITUDE\":\"45.771347062280356\"},{\"LONGITUDE\":\"127.22444746502697\",\"LATITUDE\":\"45.77152824456578\"},{\"LONGITUDE\":\"127.22650640052738\",\"LATITUDE\":\"45.77179233921475\"},{\"LONGITUDE\":\"127.22866624138204\",\"LATITUDE\":\"45.77206369610122\"},{\"LONGITUDE\":\"127.23160050437093\",\"LATITUDE\":\"45.77251444543026\"},{\"LONGITUDE\":\"127.2326052732488\",\"LATITUDE\":\"45.7726706540249\"},{\"LONGITUDE\":\"127.23425270288034\",\"LATITUDE\":\"45.772938588765825\"},{\"LONGITUDE\":\"127.23703592931743\",\"LATITUDE\":\"45.773450651752725\"},{\"LONGITUDE\":\"127.23954601423777\",\"LATITUDE\":\"45.77391932173952\"},{\"LONGITUDE\":\"127.2397376507879\",\"LATITUDE\":\"45.77394733240587\"},{\"LONGITUDE\":\"127.24839708993726\",\"LATITUDE\":\"45.775579791049374\"},{\"LONGITUDE\":\"127.25002078686738\",\"LATITUDE\":\"45.77588918243103\"},{\"LONGITUDE\":\"127.2525245142845\",\"LATITUDE\":\"45.77637625775423\"},{\"LONGITUDE\":\"127.25596758260689\",\"LATITUDE\":\"45.77698615230277\"},{\"LONGITUDE\":\"127.25736717761062\",\"LATITUDE\":\"45.77719504456402\"},{\"LONGITUDE\":\"127.25854708168687\",\"LATITUDE\":\"45.777345081309356\"},{\"LONGITUDE\":\"127.26228315288344\",\"LATITUDE\":\"45.77770520012038\"},{\"LONGITUDE\":\"127.26493758049531\",\"LATITUDE\":\"45.77782956685976\"},{\"LONGITUDE\":\"127.26823822174684\",\"LATITUDE\":\"45.77787534968961\"},{\"LONGITUDE\":\"127.27057966184753\",\"LATITUDE\":\"45.777838917292655\"},{\"LONGITUDE\":\"127.27182550191229\",\"LATITUDE\":\"45.77777337253322\"},{\"LONGITUDE\":\"127.272193472673\",\"LATITUDE\":\"45.77775845647047\"},{\"LONGITUDE\":\"127.27379644302486\",\"LATITUDE\":\"45.77765855383839\"},{\"LONGITUDE\":\"127.27600566139986\",\"LATITUDE\":\"45.777458972692784\"},{\"LONGITUDE\":\"127.27898943156781\",\"LATITUDE\":\"45.77707487452984\"},{\"LONGITUDE\":\"127.2802229091469\",\"LATITUDE\":\"45.77685556815545\"},{\"LONGITUDE\":\"127.28096824201172\",\"LATITUDE\":\"45.77672765465737\"},{\"LONGITUDE\":\"127.28257907492686\",\"LATITUDE\":\"45.77646436231354\"},{\"LONGITUDE\":\"127.28431814702648\",\"LATITUDE\":\"45.77622540184562\"},{\"LONGITUDE\":\"127.28747855413565\",\"LATITUDE\":\"45.775710745976006\"},{\"LONGITUDE\":\"127.29047036733682\",\"LATITUDE\":\"45.77523295174873\"},{\"LONGITUDE\":\"127.3002280021637\",\"LATITUDE\":\"45.77375486576496\"},{\"LONGITUDE\":\"127.312455612674\",\"LATITUDE\":\"45.77266899141541\"},{\"LONGITUDE\":\"127.30589661604958\",\"LATITUDE\":\"45.77314613575635\"},{\"LONGITUDE\":\"127.31087731351073\",\"LATITUDE\":\"45.77277516724727\"},{\"LONGITUDE\":\"127.30240851261021\",\"LATITUDE\":\"45.773501106870064\"},{\"LONGITUDE\":\"127.3097780782764\",\"LATITUDE\":\"45.772841383508585\"},{\"LONGITUDE\":\"127.31694755120019\",\"LATITUDE\":\"45.77235534643425\"},{\"LONGITUDE\":\"127.325693943364\",\"LATITUDE\":\"45.77167282523294\"},{\"LONGITUDE\":\"127.32825764184787\",\"LATITUDE\":\"45.7714351816517\"},{\"LONGITUDE\":\"127.33229350295372\",\"LATITUDE\":\"45.77107394939438\"},{\"LONGITUDE\":\"127.3353770193184\",\"LATITUDE\":\"45.77079924074447\"},{\"LONGITUDE\":\"127.33855394911178\",\"LATITUDE\":\"45.77049537644458\"},{\"LONGITUDE\":\"127.34072311706407\",\"LATITUDE\":\"45.770292200777924\"},{\"LONGITUDE\":\"127.34268172113016\",\"LATITUDE\":\"45.77004158745296\"},{\"LONGITUDE\":\"127.34417601401431\",\"LATITUDE\":\"45.76985162596455\"},{\"LONGITUDE\":\"127.34570140553343\",\"LATITUDE\":\"45.76962038435954\"},{\"LONGITUDE\":\"127.34948932453845\",\"LATITUDE\":\"45.76897593105022\"},{\"LONGITUDE\":\"127.3516916599547\",\"LATITUDE\":\"45.768544247799355\"},{\"LONGITUDE\":\"127.35281287653285\",\"LATITUDE\":\"45.76832326743264\"},{\"LONGITUDE\":\"127.3560751776296\",\"LATITUDE\":\"45.76759527735101\"},{\"LONGITUDE\":\"127.35922604674613\",\"LATITUDE\":\"45.76679346077041\"},{\"LONGITUDE\":\"127.36285807924563\",\"LATITUDE\":\"45.765784346162185\"},{\"LONGITUDE\":\"127.36735413913755\",\"LATITUDE\":\"45.76455851003905\"},{\"LONGITUDE\":\"127.36951877426068\",\"LATITUDE\":\"45.76397768354763\"},{\"LONGITUDE\":\"127.37069578508049\",\"LATITUDE\":\"45.76365722106608\"},{\"LONGITUDE\":\"127.37524002303002\",\"LATITUDE\":\"45.76244260444598\"},{\"LONGITUDE\":\"127.37661629548569\",\"LATITUDE\":\"45.76208738974962\"},{\"LONGITUDE\":\"127.38665398500493\",\"LATITUDE\":\"45.759481135460874\"},{\"LONGITUDE\":\"127.38750362939196\",\"LATITUDE\":\"45.759282483523705\"},{\"LONGITUDE\":\"127.38498366313918\",\"LATITUDE\":\"45.759910539762544\"},{\"LONGITUDE\":\"127.37926440090096\",\"LATITUDE\":\"45.76138417564575\"},{\"LONGITUDE\":\"127.38263178198824\",\"LATITUDE\":\"45.760515340394434\"},{\"LONGITUDE\":\"127.403309955624\",\"LATITUDE\":\"45.75723492407291\"},{\"LONGITUDE\":\"127.39514793656508\",\"LATITUDE\":\"45.757868877510504\"},{\"LONGITUDE\":\"127.38819293967752\",\"LATITUDE\":\"45.75912377581593\"},{\"LONGITUDE\":\"127.39716998538675\",\"LATITUDE\":\"45.75762028468148\"},{\"LONGITUDE\":\"127.39400111510334\",\"LATITUDE\":\"45.75801801037685\"},{\"LONGITUDE\":\"127.39035991598377\",\"LATITUDE\":\"45.758632516044386\"},{\"LONGITUDE\":\"127.39884235102129\",\"LATITUDE\":\"45.757460629838356\"},{\"LONGITUDE\":\"127.40602383352916\",\"LATITUDE\":\"45.75721889996727\"},{\"LONGITUDE\":\"127.40086301869691\",\"LATITUDE\":\"45.75733814841974\"},{\"LONGITUDE\":\"127.4100383400669\",\"LATITUDE\":\"45.757389201237096\"},{\"LONGITUDE\":\"127.41165849164814\",\"LATITUDE\":\"45.75748903336556\"},{\"LONGITUDE\":\"127.41477726843459\",\"LATITUDE\":\"45.75768616105296\"},{\"LONGITUDE\":\"127.41782743532598\",\"LATITUDE\":\"45.757850972088654\"},{\"LONGITUDE\":\"127.42043098577194\",\"LATITUDE\":\"45.7580064957457\"},{\"LONGITUDE\":\"127.42273812744892\",\"LATITUDE\":\"45.75814415025925\"},{\"LONGITUDE\":\"127.42911582355379\",\"LATITUDE\":\"45.75850390439299\"},{\"LONGITUDE\":\"127.43115688079219\",\"LATITUDE\":\"45.758596559213295\"},{\"LONGITUDE\":\"127.43302079489034\",\"LATITUDE\":\"45.75863559194857\"},{\"LONGITUDE\":\"127.43407708057978\",\"LATITUDE\":\"45.7586045652206\"},{\"LONGITUDE\":\"127.43509432467245\",\"LATITUDE\":\"45.758532638320965\"},{\"LONGITUDE\":\"127.43672097428738\",\"LATITUDE\":\"45.75830330191825\"},{\"LONGITUDE\":\"127.43805873621326\",\"LATITUDE\":\"45.758029634445016\"},{\"LONGITUDE\":\"127.43953623396618\",\"LATITUDE\":\"45.75762564612711\"},{\"LONGITUDE\":\"127.44037531394345\",\"LATITUDE\":\"45.75731907616825\"},{\"LONGITUDE\":\"127.44050516760748\",\"LATITUDE\":\"45.75726946211779\"},{\"LONGITUDE\":\"127.44098462068673\",\"LATITUDE\":\"45.75709991088582\"},{\"LONGITUDE\":\"127.44285433069763\",\"LATITUDE\":\"45.75622289462334\"},{\"LONGITUDE\":\"127.44488455708418\",\"LATITUDE\":\"45.75488198352719\"},{\"LONGITUDE\":\"127.44797777394244\",\"LATITUDE\":\"45.75226394122543\"},{\"LONGITUDE\":\"127.44810855758693\",\"LATITUDE\":\"45.752143477137146\"},{\"LONGITUDE\":\"127.45060227627933\",\"LATITUDE\":\"45.75003117575838\"},{\"LONGITUDE\":\"127.45374937201593\",\"LATITUDE\":\"45.747347914606955\"},{\"LONGITUDE\":\"127.45694883520392\",\"LATITUDE\":\"45.74466825628941\"},{\"LONGITUDE\":\"127.45740087234311\",\"LATITUDE\":\"45.74430367218111\"},{\"LONGITUDE\":\"127.45789181307971\",\"LATITUDE\":\"45.743899324286396\"},{\"LONGITUDE\":\"127.45801255263895\",\"LATITUDE\":\"45.74380798179004\"},{\"LONGITUDE\":\"127.46114351782491\",\"LATITUDE\":\"45.74129163720613\"},{\"LONGITUDE\":\"127.46207733011865\",\"LATITUDE\":\"45.74054012635695\"},{\"LONGITUDE\":\"127.46210726043775\",\"LATITUDE\":\"45.74052030432534\"},{\"LONGITUDE\":\"127.46260908792551\",\"LATITUDE\":\"45.740194303943696\"},{\"LONGITUDE\":\"127.46260908481702\",\"LATITUDE\":\"45.74018230283539\"},{\"LONGITUDE\":\"127.4627995851189\",\"LATITUDE\":\"45.7398604308783\"},{\"LONGITUDE\":\"127.46300005325429\",\"LATITUDE\":\"45.73950762082158\"},{\"LONGITUDE\":\"127.46306088778412\",\"LATITUDE\":\"45.73938698150812\"},{\"LONGITUDE\":\"127.46306087192531\",\"LATITUDE\":\"45.73932697585288\"},{\"LONGITUDE\":\"127.4630508752995\",\"LATITUDE\":\"45.739256908221876\"},{\"LONGITUDE\":\"127.46304088155762\",\"LATITUDE\":\"45.73919784163186\"},{\"LONGITUDE\":\"127.46301093130552\",\"LATITUDE\":\"45.739137652982585\"},{\"LONGITUDE\":\"127.46296002718856\",\"LATITUDE\":\"45.739078336572746\"},{\"LONGITUDE\":\"127.46248798729908\",\"LATITUDE\":\"45.73881444296567\"},{\"LONGITUDE\":\"127.46290013994015\",\"LATITUDE\":\"45.73900896472722\"},{\"LONGITUDE\":\"127.46284025545296\",\"LATITUDE\":\"45.73895059432088\"},{\"LONGITUDE\":\"127.46276939984679\",\"LATITUDE\":\"45.738911159341896\"},{\"LONGITUDE\":\"127.46268956387836\",\"LATITUDE\":\"45.738872670465554\"},{\"LONGITUDE\":\"127.46139438914018\",\"LATITUDE\":\"45.73899791144188\"},{\"LONGITUDE\":\"127.46259875394547\",\"LATITUDE\":\"45.73884311659746\"},{\"LONGITUDE\":\"127.46235826418513\",\"LATITUDE\":\"45.73879665730488\"},{\"LONGITUDE\":\"127.46220758834863\",\"LATITUDE\":\"45.738788748352505\"},{\"LONGITUDE\":\"127.46108421289925\",\"LATITUDE\":\"45.7396221371993\"},{\"LONGITUDE\":\"127.46148517954242\",\"LATITUDE\":\"45.73893744419565\"},{\"LONGITUDE\":\"127.46204693575788\",\"LATITUDE\":\"45.738790783062235\"},{\"LONGITUDE\":\"127.46190624164913\",\"LATITUDE\":\"45.73880194101039\"},{\"LONGITUDE\":\"127.4616870872662\",\"LATITUDE\":\"45.74022476362237\"},{\"LONGITUDE\":\"127.46179548524266\",\"LATITUDE\":\"45.73882328091886\"},{\"LONGITUDE\":\"127.46168572886631\",\"LATITUDE\":\"45.738854629142246\"},{\"LONGITUDE\":\"127.46107421559174\",\"LATITUDE\":\"45.73955207187827\"},{\"LONGITUDE\":\"127.46158495548397\",\"LATITUDE\":\"45.738896033120355\"},{\"LONGITUDE\":\"127.46131457266576\",\"LATITUDE\":\"45.739049443718734\"},{\"LONGITUDE\":\"127.46125471597504\",\"LATITUDE\":\"45.739110095496045\"},{\"LONGITUDE\":\"127.46163718385357\",\"LATITUDE\":\"45.74018546282745\"},{\"LONGITUDE\":\"127.46107419979435\",\"LATITUDE\":\"45.73949206624695\"},{\"LONGITUDE\":\"127.4611938585701\",\"LATITUDE\":\"45.739160740847595\"},{\"LONGITUDE\":\"127.46115395929209\",\"LATITUDE\":\"45.73922151112926\"},{\"LONGITUDE\":\"127.46111405992409\",\"LATITUDE\":\"45.739282281589134\"},{\"LONGITUDE\":\"127.46109412065341\",\"LATITUDE\":\"45.73935217061014\"},{\"LONGITUDE\":\"127.46152640009991\",\"LATITUDE\":\"45.74010679687512\"},{\"LONGITUDE\":\"127.46108416024138\",\"LATITUDE\":\"45.73942211842824\"},{\"LONGITUDE\":\"127.46110418644659\",\"LATITUDE\":\"45.73968226037086\"},{\"LONGITUDE\":\"127.46113413857742\",\"LATITUDE\":\"45.7397414423074\"},{\"LONGITUDE\":\"127.46144655514824\",\"LATITUDE\":\"45.74004831761858\"},{\"LONGITUDE\":\"127.46116508618132\",\"LATITUDE\":\"45.739791629388016\"},{\"LONGITUDE\":\"127.46121499328852\",\"LATITUDE\":\"45.73984092840886\"},{\"LONGITUDE\":\"127.46127488171113\",\"LATITUDE\":\"45.73990028762945\"},{\"LONGITUDE\":\"127.46133576784102\",\"LATITUDE\":\"45.73995965316668\"},{\"LONGITUDE\":\"127.46138567193663\",\"LATITUDE\":\"45.73999895223533\"},{\"LONGITUDE\":\"127.46210925356402\",\"LATITUDE\":\"45.74051031539963\"},{\"LONGITUDE\":\"127.46219009399928\",\"LATITUDE\":\"45.74056880669955\"}]");
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }

                }else {

                    gpsList = detail.optJSONArray("gpsList");

                }

                if (gpsList != null) {

                    for (int j = 0; j < gpsList.length(); j++) {

                        JSONObject gpsItem = gpsList.optJSONObject(j);

                        Gps gps = new Gps();

                        gps.LATITUDE = gpsItem.optDouble("LATITUDE");

                        gps.LONGITUDE = gpsItem.optDouble("LONGITUDE");

                        if (!(gps.LATITUDE == 0) && !(gps.LONGITUDE == 0)) {

                            detailItem.gpsList.add(gps);

                        }

                    }

                }

                info.detailItemList.add(detailItem);


            }

        }

        return info;
    }

    public static class Info {

        public String msg;

        public String code;

        public List<DetailItem> detailItemList = new ArrayList<>();

    }


    public static class DetailItem implements Serializable{

        public String order_code;

        public String start_point_f;

        public String end_point_f;

        public String start_time;

        public String end_time;

        public String money;

        public String id;

        public String start_point;

        public String end_point;

        public List<Gps> gpsList = new ArrayList<>();

    }

    public static class Gps implements Serializable{

        public double LONGITUDE, LATITUDE;

    }

}
